package sca.com.cy.service.factory;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import sca.com.cy.service.RemoteProviderService;

@Component
public class ProviderFallbackFactory implements FallbackFactory<RemoteProviderService> {
    @Override
    public RemoteProviderService create(Throwable throwable) {
        return new RemoteProviderService() {
            @Override
            public String echoMsg(String msg) {
                return "系统维护中,请稍后再登"+throwable.getMessage();
            }
        };
    }
}
